import { Selection, TrendType } from './match'
import { BettingOrderStatus, BettingMethod } from '@/enums'
import { BettingSelection } from './betting'

export enum BetslipTab {
	Single = 'Single',
	Combo = 'Combo',
	Follow = 'Follow'
}

export enum BetslipItemStatus {
	none = '',
	disabled = 'disabled',
	confirming = 'confirming',
	fail = 'fail',
	failed = 'failed',
	success = 'success',
	successed = 'successed'
}

export interface BetslipBaseType {
	type: BettingMethod
	amount: number
	status: BetslipItemStatus
	stake?: number
	minStake?: number
	maxStake?: number
	trueOdds?: number
	displayOdds?: string
	trend?: TrendType
	freeBet?: any
	freeBets?: any[]
	order?: BettingOrderType | null
	followOrder?: string
	feedId?: number
	needAccept?: boolean
	isOverLimit?: boolean
	selection?: BettingSelection
	uuid?: number
}

export interface BetslipInfoType {
	id: string
	eventId: string
	marketId: string
}

export interface BetslipItemType extends BetslipBaseType, BetslipInfoType {}

export interface BetslipComboType extends BetslipBaseType {
	comboBonus?: any
	disableIds?: string[]
	list?: BetslipInfoType[]
	selections?: BettingSelection[]
}

export interface BettingOrderType {
	orderNo: string
	status: BettingOrderStatus
	selections: Selection[]
}
